﻿using System;
using System.Data;
using System.Data.SqlClient;
namespace Model
{
    //BaoMing
    public class BaoMing
    {
        #region BaoMing
        /// <summary>
        /// 
        /// </summary>
        public BaoMing()
        {
        }
        /// <summary>	 
        /// 
        /// </summary>
        public BaoMing(Int32 id)
        {
            this._id = id;

        }
        /// <summary>	 
        /// 
        /// </summary>		
        public BaoMing(DataRow dr)
        {
            int.TryParse(Convert.ToString(dr["Id"]), out _id);
            this._orderno = Convert.ToString(dr["OrderNO"]);
            this._username = Convert.ToString(dr["UserName"]);
            this._sex = Convert.ToInt16(dr["Sex"]);
            if (dr["Birthday"] != DBNull.Value)
                this._birthday = Convert.ToDateTime(dr["Birthday"]);
            this._placeorigin = Convert.ToString(dr["PlaceOrigin"]);
            this._placebirth = Convert.ToString(dr["PlaceBirth"]);
            this._regclass = Convert.ToInt16(dr["RegClass"]);
            this._idcardno = Convert.ToString(dr["IdCardNo"]);
            this._censusclass = Convert.ToInt16(dr["CensusClass"]);
            this._censusaddr = Convert.ToString(dr["CensusAddr"]);
            this._ifinschool = Convert.ToInt16(dr["IfInSchool"]);
            this._inschoolinfo = Convert.ToString(dr["InSchoolInfo"]);
            this._allergichistory = Convert.ToString(dr["AllergicHistory"]);
            this._sepcialdisease = Convert.ToString(dr["SepcialDisease"]);
            this._fathername = Convert.ToString(dr["FatherName"]);
            this._fatherworks = Convert.ToString(dr["FatherWorks"]);
            this._fathertel = Convert.ToString(dr["FatherTel"]);
            this._fatherinsz = Convert.ToInt16(dr["FatherInSZ"]);
            this._fatherpaysb = Convert.ToInt16(dr["FatherPaySB"]);
            if (dr["FatherPayJZZ"] != DBNull.Value)
                this._fatherpayJzz = Convert.ToInt32(dr["FatherPayJZZ"]);
            this._mothername = Convert.ToString(dr["MotherName"]);
            this._motherworks = Convert.ToString(dr["MotherWorks"]);
            this._mothertel = Convert.ToString(dr["MotherTel"]);
            this._motherinsz = Convert.ToInt16(dr["MotherInSZ"]);
            this._motherpaysb = Convert.ToInt16(dr["MotherPaySB"]);
            if (dr["MotherPayJZZ"] != DBNull.Value)
                this._motherpayJzz = Convert.ToInt32(dr["MotherPayJZZ"]);
            this._houseaddr = Convert.ToString(dr["HouseAddr"]);
            this._housenature = Convert.ToInt16(dr["HouseNature"]);
            if (dr["BuyHouseDate"] != DBNull.Value)
                this._buyhousedate = Convert.ToDateTime(dr["BuyHouseDate"]);
            if (dr["RentHouseDate"] != DBNull.Value)
                this._renthousedate = Convert.ToDateTime(dr["RentHouseDate"]);
            this._planning = Convert.ToInt16(dr["Planning"]);
            this._childcounts = Convert.ToInt32(dr["ChildCounts"]);
            this._childindex = Convert.ToInt32(dr["ChildIndex"]);
            this._casetype = Convert.ToString(dr["CaseType"]);
            this._signname = Convert.ToString(dr["SignName"]);
            if (dr["SignDate"] != DBNull.Value)
                this._signdate = Convert.ToDateTime(dr["SignDate"]);
            this._notes = Convert.ToString(dr["Notes"]);
            if (dr["AddTime"] != DBNull.Value)
                this._addtime = Convert.ToDateTime(dr["AddTime"]);
            this._photos = Convert.ToString(dr["Photos"]);
            this._status = Convert.ToInt16(dr["Status"]);
            this._classnum = Convert.ToString(dr["ClassNum"]);
            this._classno = Convert.ToString(dr["ClassNo"]);
            this._checkinfos = Convert.ToString(dr["CheckInfos"]);
            this._userpwd = Convert.ToString(dr["UserPwd"]);
            this._email = Convert.ToString(dr["Email"]);
            this._username2 = Convert.ToString(dr["UserName2"]);
            this._userid = Convert.ToInt32(dr["UserId"]);
            this._nurseryschool = Convert.ToInt16(dr["NurserySchool"]);
            this._fathercardno = Convert.ToString(dr["FatherCardNo"]);
            this._mothercardno = Convert.ToString(dr["MotherCardNo"]);
            if (dr["HouseRegionID"] != DBNull.Value)
                this.houseRegionID = Convert.ToInt16(dr["HouseRegionID"]);
            if (dr["HouseGroupID"] != DBNull.Value)
                this.houseGroupID = Convert.ToInt16(dr["HouseGroupID"]);
            if (dr["HouseNumber"] != DBNull.Value)
                this.houseNumberID = Convert.ToInt16(dr["HouseNumber"]);
            if (dr["HouseNumber1"] != DBNull.Value)
                this.houseNumber1 = Convert.ToInt16(dr["HouseNumber1"]);
            if (dr["HouseNumber2"] != DBNull.Value)
                this.houseNumber2 = Convert.ToInt16(dr["HouseNumber2"]);
            if (dr["HouseArea"] != DBNull.Value)
                this.houseArea = Convert.ToString(dr["HouseArea"]);
            if (dr["HouseAreaID"] != DBNull.Value)
                this.houseAreaID = Convert.ToInt16(dr["HouseAreaID"]);
            if (dr["NoteNo"] != DBNull.Value)
                this.noteNo = Convert.ToString(dr["NoteNo"]);
            this.censusProvince = Convert.ToString(dr["CensusProvince"]);
            this.censusCity = Convert.ToString(dr["CensusCity"]);
            this.censusArea = Convert.ToString(dr["CensusArea"]);
            this.censusPoliceStation = Convert.ToString(dr["CensusPoliceStation"]);
        }
        #endregion

        #region Id
        /// <summary>
        /// Id
        /// </summary>		
        private int _id;
        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }
        #endregion
        #region OrderNO
        /// <summary>
        /// OrderNO
        /// </summary>		
        private string _orderno;
        public string OrderNO
        {
            get { return _orderno; }
            set { _orderno = value; }
        }
        #endregion
        #region UserName
        /// <summary>
        /// UserName
        /// </summary>		
        private string _username;
        public string UserName
        {
            get { return _username; }
            set { _username = value; }
        }
        #endregion
        #region Sex
        /// <summary>
        /// Sex
        /// </summary>		
        private Int16 _sex;
        public Int16 Sex
        {
            get { return _sex; }
            set { _sex = value; }
        }
        #endregion
        #region Birthday
        /// <summary>
        /// Birthday
        /// </summary>		
        private DateTime _birthday;
        public DateTime Birthday
        {
            get { return _birthday; }
            set { _birthday = value; }
        }
        #endregion
        #region PlaceOrigin
        /// <summary>
        /// PlaceOrigin
        /// </summary>		
        private string _placeorigin;
        public string PlaceOrigin
        {
            get { return _placeorigin; }
            set { _placeorigin = value; }
        }
        #endregion
        #region PlaceBirth
        /// <summary>
        /// PlaceBirth
        /// </summary>		
        private string _placebirth;
        public string PlaceBirth
        {
            get { return _placebirth; }
            set { _placebirth = value; }
        }
        #endregion
        #region RegClass
        /// <summary>
        /// RegClass
        /// </summary>		
        private Int16 _regclass;
        public Int16 RegClass
        {
            get { return _regclass; }
            set { _regclass = value; }
        }
        #endregion
        #region IdCardNo
        /// <summary>
        /// IdCardNo
        /// </summary>		
        private string _idcardno;
        public string IdCardNo
        {
            get { return _idcardno; }
            set { _idcardno = value; }
        }
        #endregion
        #region CensusClass
        /// <summary>
        /// CensusClass
        /// </summary>		
        private Int16 _censusclass;
        public Int16 CensusClass
        {
            get { return _censusclass; }
            set { _censusclass = value; }
        }
        #endregion
        #region CensusAddr
        /// <summary>
        /// CensusAddr
        /// </summary>		
        private string _censusaddr;
        public string CensusAddr
        {
            get { return _censusaddr; }
            set { _censusaddr = value; }
        }
        #endregion
        #region IfInSchool
        /// <summary>
        /// IfInSchool
        /// </summary>		
        private Int16 _ifinschool;
        public Int16 IfInSchool
        {
            get { return _ifinschool; }
            set { _ifinschool = value; }
        }
        #endregion
        #region InSchoolInfo
        /// <summary>
        /// InSchoolInfo
        /// </summary>		
        private string _inschoolinfo;
        public string InSchoolInfo
        {
            get { return _inschoolinfo; }
            set { _inschoolinfo = value; }
        }
        #endregion
        #region AllergicHistory
        /// <summary>
        /// AllergicHistory
        /// </summary>		
        private string _allergichistory;
        public string AllergicHistory
        {
            get { return _allergichistory; }
            set { _allergichistory = value; }
        }
        #endregion
        #region SepcialDisease
        /// <summary>
        /// SepcialDisease
        /// </summary>		
        private string _sepcialdisease;
        public string SepcialDisease
        {
            get { return _sepcialdisease; }
            set { _sepcialdisease = value; }
        }
        #endregion
        #region FatherName
        /// <summary>
        /// FatherName
        /// </summary>		
        private string _fathername;
        public string FatherName
        {
            get { return _fathername; }
            set { _fathername = value; }
        }
        #endregion
        #region FatherWorks
        /// <summary>
        /// FatherWorks
        /// </summary>		
        private string _fatherworks;
        public string FatherWorks
        {
            get { return _fatherworks; }
            set { _fatherworks = value; }
        }
        #endregion
        #region FatherTel
        /// <summary>
        /// FatherTel
        /// </summary>		
        private string _fathertel;
        public string FatherTel
        {
            get { return _fathertel; }
            set { _fathertel = value; }
        }
        #endregion
        #region FatherInSZ
        /// <summary>
        /// FatherInSZ
        /// </summary>		
        private Int16 _fatherinsz;
        public Int16 FatherInSZ
        {
            get { return _fatherinsz; }
            set { _fatherinsz = value; }
        }
        #endregion
        #region FatherPaySB
        /// <summary>
        /// FatherPaySB
        /// </summary>		
        private Int16 _fatherpaysb;
        public Int16 FatherPaySB
        {
            get { return _fatherpaysb; }
            set { _fatherpaysb = value; }
        }
        #endregion
        #region MotherName
        /// <summary>
        /// MotherName
        /// </summary>		
        private string _mothername;
        public string MotherName
        {
            get { return _mothername; }
            set { _mothername = value; }
        }
        #endregion
        #region MotherWorks
        /// <summary>
        /// MotherWorks
        /// </summary>		
        private string _motherworks;
        public string MotherWorks
        {
            get { return _motherworks; }
            set { _motherworks = value; }
        }
        #endregion
        #region MotherTel
        /// <summary>
        /// MotherTel
        /// </summary>		
        private string _mothertel;
        public string MotherTel
        {
            get { return _mothertel; }
            set { _mothertel = value; }
        }
        #endregion
        #region MotherInSZ
        /// <summary>
        /// MotherInSZ
        /// </summary>		
        private Int16 _motherinsz;
        public Int16 MotherInSZ
        {
            get { return _motherinsz; }
            set { _motherinsz = value; }
        }
        #endregion
        #region MotherPaySB
        /// <summary>
        /// MotherPaySB
        /// </summary>		
        private Int16 _motherpaysb;
        public Int16 MotherPaySB
        {
            get { return _motherpaysb; }
            set { _motherpaysb = value; }
        }
        #endregion
        #region HouseAddr
        /// <summary>
        /// HouseAddr
        /// </summary>		
        private string _houseaddr;
        public string HouseAddr
        {
            get { return _houseaddr; }
            set { _houseaddr = value; }
        }
        #endregion
        #region HouseNature
        /// <summary>
        /// HouseNature
        /// </summary>		
        private Int16 _housenature;
        public Int16 HouseNature
        {
            get { return _housenature; }
            set { _housenature = value; }
        }
        #endregion
        #region BuyHouseDate
        /// <summary>
        /// BuyHouseDate
        /// </summary>		
        private DateTime _buyhousedate;
        public DateTime BuyHouseDate
        {
            get { return _buyhousedate; }
            set { _buyhousedate = value; }
        }
        #endregion
        #region RentHouseDate
        /// <summary>
        /// RentHouseDate
        /// </summary>		
        private DateTime _renthousedate;
        public DateTime RentHouseDate
        {
            get { return _renthousedate; }
            set { _renthousedate = value; }
        }
        #endregion
        #region Planning
        /// <summary>
        /// Planning
        /// </summary>		
        private Int16 _planning;
        public Int16 Planning
        {
            get { return _planning; }
            set { _planning = value; }
        }
        #endregion
        #region ChildCounts
        /// <summary>
        /// ChildCounts
        /// </summary>		
        private int _childcounts;
        public int ChildCounts
        {
            get { return _childcounts; }
            set { _childcounts = value; }
        }
        #endregion
        #region ChildIndex
        /// <summary>
        /// ChildIndex
        /// </summary>		
        private int _childindex;
        public int ChildIndex
        {
            get { return _childindex; }
            set { _childindex = value; }
        }
        #endregion
        #region CaseType
        /// <summary>
        /// CaseType
        /// </summary>		
        private string _casetype;
        public string CaseType
        {
            get { return _casetype; }
            set { _casetype = value; }
        }
        #endregion
        #region SignName
        /// <summary>
        /// SignName
        /// </summary>		
        private string _signname;
        public string SignName
        {
            get { return _signname; }
            set { _signname = value; }
        }
        #endregion
        #region SignDate
        /// <summary>
        /// SignDate
        /// </summary>		
        private DateTime _signdate;
        public DateTime SignDate
        {
            get { return _signdate; }
            set { _signdate = value; }
        }
        #endregion
        #region Notes
        /// <summary>
        /// Notes
        /// </summary>		
        private string _notes;
        public string Notes
        {
            get { return _notes; }
            set { _notes = value; }
        }
        #endregion
        #region AddTime
        /// <summary>
        /// AddTime
        /// </summary>		
        private DateTime _addtime;
        public DateTime AddTime
        {
            get { return _addtime; }
            set { _addtime = value; }
        }
        #endregion
        #region Photos
        /// <summary>
        /// Photos
        /// </summary>		
        private string _photos;
        public string Photos
        {
            get { return _photos; }
            set { _photos = value; }
        }
        #endregion
        #region Status
        /// <summary>
        /// Status
        /// </summary>		
        private Int16 _status;
        public Int16 Status
        {
            get { return _status; }
            set { _status = value; }
        }
        #endregion
        #region ClassNum
        /// <summary>
        /// ClassNum
        /// </summary>		
        private string _classnum;
        public string ClassNum
        {
            get { return _classnum; }
            set { _classnum = value; }
        }
        #endregion
        #region ClassNo
        /// <summary>
        /// ClassNo
        /// </summary>		
        private string _classno;
        public string ClassNo
        {
            get { return _classno; }
            set { _classno = value; }
        }
        #endregion
        #region CheckInfos
        /// <summary>
        /// CheckInfos
        /// </summary>		
        private string _checkinfos;
        public string CheckInfos
        {
            get { return _checkinfos; }
            set { _checkinfos = value; }
        }
        #endregion
        #region UserPwd
        /// <summary>
        /// UserPwd
        /// </summary>		
        private string _userpwd;
        public string UserPwd
        {
            get { return _userpwd; }
            set { _userpwd = value; }
        }
        #endregion
        #region Email
        /// <summary>
        /// Email
        /// </summary>		
        private string _email;
        public string Email
        {
            get { return _email; }
            set { _email = value; }
        }
        #endregion
        #region UserName2
        /// <summary>
        /// UserName2
        /// </summary>		
        private string _username2;
        public string UserName2
        {
            get { return _username2; }
            set { _username2 = value; }
        }
        #endregion
        #region UserId
        /// <summary>
        /// UserId
        /// </summary>		
        private int _userid;
        public int UserId
        {
            get { return _userid; }
            set { _userid = value; }
        }
        #endregion
        #region NurserySchool
        /// <summary>
        /// NurserySchool
        /// </summary>		
        private Int16 _nurseryschool;
        public Int16 NurserySchool
        {
            get { return _nurseryschool; }
            set { _nurseryschool = value; }
        }
        #endregion
        #region FatherCardNo
        /// <summary>
        /// FatherCardNo
        /// </summary>		
        private string _fathercardno;
        public string FatherCardNo
        {
            get { return _fathercardno; }
            set { _fathercardno = value; }
        }
        #endregion
        #region MotherCardNo
        /// <summary>
        /// MotherCardNo
        /// </summary>		
        private string _mothercardno;
        public string MotherCardNo
        {
            get { return _mothercardno; }
            set { _mothercardno = value; }
        }
        #endregion
        #region  houseRegionID int NULL,
        /// <summary>
        /// houseRegionID
        /// </summary>	
        private Int16 houseRegionID;
        public Int16 HouseRegionID
        {
            get { return houseRegionID; }
            set { houseRegionID = value; }
        }
        #endregion
        #region HouseGroupID int NULL,
        /// <summary>
        /// HouseGroupID
        /// </summary>	
        private Int16 houseGroupID;
        public Int16 HouseGroupID
        {
            get { return houseGroupID; }
            set { houseGroupID = value; }
        }
        #endregion

        #region HouseNumberID int NULL
        /// <summary>
        /// houseNumberID
        /// </summary>	
        private Int16 houseNumberID;
        public Int16 HouseNumberID
        {
            get { return houseNumberID; }
            set { houseNumberID = value; }
        }
        #endregion

        #region HouseNumber1 int NULL
        /// <summary>
        /// houseNumber1
        /// </summary>	
        private Int16 houseNumber1;
        public Int16 HouseNumber1
        {
            get { return houseNumber1; }
            set { houseNumber1 = value; }
        }
        #endregion

        #region HouseNumber2 int NULL
        /// <summary>
        /// houseNumberID
        /// </summary>	
        private Int16 houseNumber2;
        public Int16 HouseNumber2
        {
            get { return houseNumber2; }
            set { houseNumber2 = value; }
        }
        #endregion

        #region HouseAreaID int NULL
        /// <summary>
        /// HouseArea
        /// </summary>	
        private Int16 houseAreaID;
        public Int16 HouseAreaID
        {
            get { return houseAreaID; }
            set { houseAreaID = value; }
        }
        #endregion

        #region NoteNo int NULL
        /// <summary>
        /// HouseArea
        /// </summary>	
        private String noteNo;
        public String NoteNo
        {
            get { return noteNo; }
            set { noteNo = value; }
        }
        #endregion


        #region HouseArea int NULL
        /// <summary>
        /// HouseArea
        /// </summary>	
        private String houseArea;
        public String HouseArea
        {
            get { return houseArea; }
            set { houseArea = value; }
        }
        #endregion

        #region censusProvince varchar(200),
        /// <summary>
        /// censusProvince
        /// </summary>
        private String censusProvince;
        public String CensusProvince {
            get { return censusProvince; }
            set { censusProvince = value; }
        }
        #endregion

        #region censusCity varchar(200),
	    /// <summary>
        /// censusCity
        /// </summary>
        private String censusCity;
        public String CensusCity {
            get { return censusCity; }
            set { censusCity = value; }
        }
        #endregion

        #region censusArea varchar(200),
        /// <summary>
        /// censusArea
        /// </summary>
        private String censusArea;
        public String CensusArea {
            get { return censusArea; }
            set { censusArea = value; }
        }

        #endregion

        #region censusPoliceStation varchar(200)
        /// <summary>
        /// censusPoliceStation
        /// </summary>
        private String censusPoliceStation;
        public String CensusPoliceStation {
            get { return censusPoliceStation; }
            set { censusPoliceStation = value; }
        }
        #endregion
        
        #region FatherPayJZZ
        /// <summary>
        /// FatherPayJZZ
        /// </summary>		
        private Int32 _fatherpayJzz;
        public Int32 FatherPayJZZ
        {
            get { return _fatherpayJzz; }
            set { _fatherpayJzz = value; }
        }
        #endregion

        #region MotherPayJZZ
        /// <summary>
        /// MotherPaySB
        /// </summary>		
        private Int32 _motherpayJzz;
        public Int32 MotherPayJZZ
        {
            get { return _motherpayJzz; }
            set { _motherpayJzz = value; }
        }
        #endregion
    }
}